Skip to content

[Metricbeat] Add README to mocked tests folder#11714

Merged
sayden merged 4 commits intoelastic:masterfrom
sayden:feature/mb/add-readme-to-mocked-tests
Apr 24, 2019
Merged

[Metricbeat] Add README to mocked tests folder#11714
sayden merged 4 commits intoelastic:masterfrom
sayden:feature/mb/add-readme-to-mocked-tests

Conversation

@sayden
Copy link
Copy Markdown
Contributor

@sayden sayden commented Apr 9, 2019

Split PR from here #11703

Added a README.md file to the folder where the code is located showing current options, flags and use.

@sayden sayden added review Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Apr 9, 2019
@sayden sayden self-assigned this Apr 9, 2019
@sayden sayden requested a review from ruflin April 9, 2019 09:00
@sayden sayden requested a review from a team as a code owner April 9, 2019 09:00
@sayden sayden force-pushed the feature/mb/add-readme-to-mocked-tests branch from 6e778b3 to 728f42c Compare April 10, 2019 12:48
@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Apr 23, 2019

@ruflin can you take a look here? please :)

Comment thread metricbeat/mb/testing/data/README.md Outdated
#### What it is
Many modules do requests to an HTTP endpoint to fetch metrics data. Then they do data manipulation and enriching of this data before sending it to Elasticsearch.

What we wanted to achieve is to mock the HTTP responses from the modules into a generic server that will serve those responses. So, for each tested metricset, an HTTP server is launched at a random port (but be aware that JSON responses written to disk are hardcoded with value "127.0.0.1:5555") with the mocked response from a fixed module version to respond to the HTTP requests, once the test is done, it's shut down.. This way we isolate the manipulation of data in some tests and reduce lot of boilerplate we had in many modules.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one extra dot 😄

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (except the 2 dots 🤣 )

@sayden sayden merged commit e97be0a into elastic:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Metricbeat Metricbeat review Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants